package com.ssm.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ssm.bean.City;
import com.ssm.service.CityService;

@Controller
@RequestMapping(value="/city")
public class CityController {
	@Autowired
	private CityService cityService;
	
	@RequestMapping(value="/selectAll")
	private String selectAll(HttpServletRequest request,HttpServletResponse response){
		List<City> list=cityService.selectAll();
		request.setAttribute("list", list);
		return "list";
	}
}
